package com.zhangmeng.tools.editors.timifx;

import com.zhangmeng.tools.utils.Resources;
import javafx.scene.layout.AnchorPane;
import net.imyeyu.timifx.component.TextAreaEditor;
import net.imyeyu.timijava.Lang;
import net.imyeyu.timijava.Tools;
import net.imyeyu.timijava.bean.Language;
import net.imyeyu.timijava.config.Config;
import net.imyeyu.timijava.config.ConfigManager;

import static net.imyeyu.timifx.TimiFX.CSS_BORDER_L;
import static net.imyeyu.timifx.TimiFX.TIMI_FX_LANG;
import static net.imyeyu.timijava.TimiJava.TIMI_JAVA_LANG;

public class TimiFxEditor extends AnchorPane {

    private TextAreaEditor editor ;

    public TextAreaEditor getEditor() {
        return editor;
    }

    public void setEditor(TextAreaEditor editor) {
        this.editor = editor;
    }

    public TimiFxEditor() {
        init();
    }

    public TimiFxEditor(String text) {
        init();
        editor.setText(text);
    }

    public void init(){
        editor = new TextAreaEditor();
        editor.getStyleClass().add(CSS_BORDER_L);
        getChildren().add(editor);
        AnchorPane.setTopAnchor(editor,0.0);
        AnchorPane.setBottomAnchor(editor,0.0);
        AnchorPane.setLeftAnchor(editor,0.0);
        AnchorPane.setRightAnchor(editor,0.0);
    }

}
